import React from 'react'

// 路由模板加载标签
import { Outlet } from 'react-router-dom'

import Index from '@/components/Business/Index'
import Register from '@/components/Business/Register'
import Login from '@/components/Business/Login'
import Order from '@/components/Business/Order'
import Collect from '@/components/Business/Collect'
import Profile from '@/components/Business/Profile'
import Coupon from '@/components/Business/Coupon'
import Password from '@/components/Business/Password'

// 路由列表
const list = [
    {
        path: 'index',
        component: Index,
        auth: true
    },
    {
        path: 'register',
        component: Register
    },
    {
        path: 'login',
        component: Login
    },
    {
        path: 'order',
        component: Order,
        auth: true
    },
    {
        path: 'collect',
        component: Collect,
        auth: true
    },
    {
        path: 'profile',
        component: Profile,
        auth: true
    },
    {
        path: 'coupon',
        component: Coupon,
        auth: true
    },
    {
        path: 'password',
        component: Password,
    }
]

const Layout = () =>  <Outlet />

const RouterList = [
    {
        path: '/business',
        component: Layout,
        children: list
    }
]


export default RouterList;